package ar.edu.caece.compiler.grammar.attributes;

import ar.edu.caece.compiler.grammar.attributes.Attribute.Type;


public class DeclaracionVariable extends Declaracion{
	private boolean isConstante;
	private int dimension;
	
	public DeclaracionVariable(String nombreVariable, Type tipo,
			boolean isConstante, int dimension) {
		super();
		this.nombreVariable = nombreVariable;
		this.tipo = tipo;
		this.isConstante = isConstante;
		this.dimension = dimension;
	}
	
	public DeclaracionVariable(String nombreVariable) {
		super();
		this.nombreVariable = nombreVariable;
	}
	
	public boolean isConstante() {
		return isConstante;
	}
	public void setConstante(boolean isConstante) {
		this.isConstante = isConstante;
	}
	public int getDimension() {
		return dimension;
	}
	public void setDimension(int dimension) {
		this.dimension = dimension;
	}

	@Override
	public String toString() {
		return "DeclaracionVariable [dimension=" + dimension + ", isConstante="
				+ isConstante + ", nombreVariable=" + nombreVariable
				+ ", tipo=" + tipo + "]";
	}

}
